#!/usr/bin/env node
import { getCode } from './getCode.mjs';
import { writeFileSync } from 'fs';
var targetDir = process.argv[2];
if (!targetDir)
    throw new Error('路径不能为空');
var data = getCode(targetDir, {
    log: true,
});
var filename = Date.now() + '.txt';
writeFileSync(filename, data.code);
console.log('总行数：' + data.line);
console.log('合并后的代码已保存到：' + filename);
